from rest_framework import serializers
from home.models import NavModel,BannerModel

# 导航序列化器
class NavSerializer(serializers.ModelSerializer):
    class Meta():
        model = NavModel
        # fields = "__all__"
        fields = ['name','link','is_http']




class BanerSerializer(serializers.ModelSerializer):
    class Meta():
        model = BannerModel
        # fields = "__all__"
        fields = ['name','link','is_http','image']





